package com.synjones.zeus.model.face;

/**
 * @author LiPeng
 * Created with IntelliJ IDEA.
 * Description:
 * User: Think
 * Date: 2018-06-13
 * Time: 16:56
 */
public enum HandleResult {

    QUANBU("", "全部"),
    CHONGXIN("1", "使用最新对比照片作为识别标准"),
    CAIJI("2", "最新照片不合格，需线下通知用户重新采集"),
    QITA("3", "其它"),
    WEICHULI("4", "未处理");



    private final String code;// 状态码
    private final String desc;// 状态码描述

    HandleResult(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String code() {
        return code;
    }

    public String desc() {
        return desc;
    }

    /**
     * *
     * 根据code获取描述
     *
     * @param code
     * @return
     */
    public static String getDesc(String code) {

        for (HandleResult info : HandleResult.values()) {
            if (code != null && code.equals(info.code)) {
                return info.desc;
            }
        }
        return code;
    }
}
